﻿using System;
using System.Diagnostics;
using DocumentManager.Abstractions.Interfaces.Helpers;

namespace DocumentManager.Helpers
{
	public class PrintDocumentManager : IPrintDocumentManager
	{
		#region IPrintDocumentManager Members

		public bool PrintDocument(string documentFilePath)
		{
			try
			{
				var process = new Process
				{
					StartInfo =
					{
						Verb = "Print",
						FileName = documentFilePath
					}
				};
				process.Start();

				return true;
			}
			catch (Exception)
			{
				return false;
			}
		}

		#endregion
	}
}
